<template>
  <div class="category">
    <h3>{{ title }}分类</h3>
    <slot :games="games" msg="hello"></slot>
  </div>
</template>

<script>
export default {
  props: ["title"],
  data() {
    return {
      games: ["英雄联盟", "逆战", "穿越火线", "扣扣飞车"],
    };
  },
};
</script>

<style scoped>
.category {
  background-color: skyblue;
  width: 200px;
  height: 300px;
}

h3 {
  text-align: center;
  background-color: orange;
}
</style>